From: Florian Müllner Date: Wed, 13 Jul 2011 20:23:03 +0000 (+0200) Subject: message-tray: Move check for _actorDestroyed into _setCount() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8054 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a92b7342bac452f84937d9d667e4145faddb381e;p=gnome-shell.git message-tray: Move check for _actorDestroyed into _setCount() As _updateCount has been designed to be overwritable by subclasses, move the check for _actorDestroyed into _setCount(), to fix the problem described in commit 5f6ac33d5 in derived types as well. --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index bf72a0f58..41475c106 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -949,14 +949,14 @@ Source.prototype = { if (isNaN(parseInt(count))) throw new Error("Invalid notification count: " + count); + if (this._actorDestroyed) + return; + this._counterBin.visible = visible; this._counterLabel.set_text(count.toString()); }, _updateCount: function() { - if (this._actorDestroyed) - return; - let count = this.notifications.length; this._setCount(count, count > 1); },